package com.example.base.net

import com.example.base.entity.OrderEntity
import com.example.base.entity.OrderEntityItem
import com.example.base.entity.Res
import okhttp3.RequestBody
import retrofit2.http.*

interface ApiService {

    @GET("/api/repair-orders")
    suspend fun getOrders():Res<OrderEntity>

    @POST("/api/repair-orders")
    suspend fun getAddOrder(@Body body: RequestBody):Res<OrderEntityItem>

    @DELETE("/api/repair-orders/{id}")
    suspend fun getDelete(@Path("id")id:Int):Res<Boolean>

    @GET("/api/repair-orders/{id}")
    suspend fun getOrderId(@Path("id")id:Int):Res<OrderEntityItem>

    @PUT("/api/repair-orders/{id}")
    suspend fun getUpData(@Path("id")id:Int,@Body body: RequestBody):Res<OrderEntityItem>

}